Repository navigation
fix(install): install mliport into .venv-nep; NEP README/docs integration (#61) - #89
Merged
Merged
Conversation
…gration (#61) P0: _nep_steps() installed only calorine, ASE and numpy, so the verify stage failed with FileNotFoundError on .venv-nep/bin/mliport (the inventory stage only worked because the bootstrap script leaks PYTHONPATH). The NEP step is now one resolver run with editable ./mliport[analysis-all] plus the pinned calorine==4.1, built from the same _uv_pip / build_package_source_args path as the other backends. This also makes --source china/offline/custom effective for NEP: the old PIP_EXTRA_INDEX_URL env was stripped by the managed source profiles and profile.index_url does not exist. P1: README.md/README_CN.md gain NEP install, environment table, example and limits; the generated environment table no longer prints "calorine==4.1 (12.9)" (NumPy/ASE resolved by the installer vs CUDA Toolkit 12.9 used to build gpumd); the manual NEP install route includes mliport; docs state that doctor reads MLIPORT_GPUMD_COMMAND (not NEP_GPUMD_COMMAND) and that a GPU-host install without gpumd stops at the closing doctor. Tests: plan-level NEP tests (editable install, pin, order, mirror/offline/custom, clean scope, isolation, other backends unchanged), docs consistency tests, and a gated real-install suite (MLIPORT_REAL_INSTALL=1) run by the new installer-real-nep CI job. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GYQHUEKJ91XQC4Hzj11Q1X
…iff probe Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GYQHUEKJ91XQC4Hzj11Q1X
…lean; drop probe Real CI run showed: doctor --device cuda needs nvidia-smi before it reaches the gpumd check (use an nvidia-smi shim), and a plain re-run stops at venv creation for every backend (documented, test pinned to it). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GYQHUEKJ91XQC4Hzj11Q1X
…d and full inventory) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GYQHUEKJ91XQC4Hzj11Q1X
… ends in index,uuid) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GYQHUEKJ91XQC4Hzj11Q1X
… log Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GYQHUEKJ91XQC4Hzj11Q1X
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tracking: #61 (not closed by this PR; #75 untouched).
状态:head
fe93113上全部 14 项 CI 通过(含新增真实安装 jobinstaller-real-nep、lint、docs 检查)。未合并,等你审阅。 CI run: https://github.com/hydrogen1222/mliport/actions/runs/42327516375问题
plan.py::_nep_steps()只装 calorine / ASE / numpy,没有装 mliport 本体,verify 阶段调用.venv-nep/bin/mliport时FileNotFoundError。inventory阶段之所以没提前暴露,是因为install_mliport.sh会导出PYTHONPATH。env={"PIP_EXTRA_INDEX_URL": ...}(托管源 profile 会清掉PIP_*/UV_*),并读取不存在的profile.index_url,所以--source china*/offline对 NEP 一直被静默忽略。calorine==4.1 (12.9)写成 NumPy 12.9,实际 12.9 是编译 gpumd 的 CUDA Toolkit。修改
_nep_steps:与其他后端同一路径(_uv_pip+build_package_source_args),一次解析装入-e ./mliport[analysis-all]与calorine==4.1(NumPy/ASE 交给解析器,不手写 pin)。仍是独立.venv-nep,NEP 仍需显式--engines nep。runtime_stack_text(),生成表改为"NumPy/ASE 由安装器解析;gpumd 用 CUDA Toolkit 12.9 编译"。README.md/README_CN.md/mliport/README.md、docs/installation*.md、docs/backends/nep*.md、CHANGELOG.md、安装脚本帮助:NEP 说明、安装命令、环境表、示例、限制;手动安装路线补上 mliport。测试
test_install_plan.py等):NEP 含 editable 安装与 pin、步骤顺序、official/china/offline/custom、--clean只删.venv-nep、多后端隔离、其他后端不受影响、文档/README 一致性。test_install_nep_real.py,MLIPORT_REAL_INSTALL=1,新 CI jobinstaller-real-nep):真实执行scripts/install_mliport.sh;.venv-nep/bin/mliport存在且可执行;在干净环境(无 PYTHONPATH)运行doctor;独立环境;重复安装与--clean;offline 暖缓存重装;中国镜像(uv shim 记录真实调用);缺 gpumd(cpu 通过、cuda 报错点名 gpumd、MLIPORT_GPUMD_COMMAND假 gpumd 通过);用 nvidia-smi shim 模拟 GPU 主机。真实安装日志(GitHub Actions
installer-real-nep,ubuntu,Python 3.12,真实网络;完整日志在该 job 的 “Print install logs” 步骤和nep-install-logsartifact)bash scripts/install_mliport.sh --engines nep --non-interactive --device cpu --source official(干净环境,无 PYTHONPATH)→exit=0:其余真实运行(12 项测试全部通过):
.venv-nep/bin/mliport存在且可执行,--help正常;import mliport指向工作区 editable 副本;calorine==4.1。.venv-nep;环境里没有 torch / mace / fairchem / deepmd / tensorflow;无其他后端启动器。doctor --device cpu通过;--device cuda退出码 1,RuntimeError: GPU NEP (Calorine GPUNEP or native gpumd) requires a gpumd executable; none was found on PATH or via MLIPORT_GPUMD_COMMAND;用MLIPORT_GPUMD_COMMAND指向(假)gpumd 则通过;只设NEP_GPUMD_COMMAND不通过(doctor 不读它)。--device auto):6 步里前 5 步成功,verify 以 gpumd 缺失失败(退出 1),环境已装但不写bin/mliport-nep。--clean重复安装:在建 venv 一步停下(A virtual environment already exists at: .venv-nep),原环境和 marker 文件未动,doctor 仍通过。--clean重装:只重建.venv-nep,旁边的.venv-bystander未动。--source offline --clean(暖缓存):成功。--source china(uv shim 记录调用):NEP 的pip install -e ./mliport[analysis-all]带--index-url https://mirrors.tuna.tsinghua.edu.cn/...;CI 能访问 TUNA,安装成功,exit 0。已知限制 / 如实说明
doctor只读MLIPORT_GPUMD_COMMAND,不读NEP_GPUMD_COMMAND(运行时用后者)。这是已存在的不一致,本 PR 只在文档里写准确,未改行为。--device auto|cuda时收尾doctor要求 gpumd,没有则安装在此失败(fail-closed,环境已装好但bin/mliport-nep不写出);文档已说明,--device cpu不受影响。.venv-*已存在时,不加--clean重跑都会停在建环境一步(uv venv无--allow-existing),之前文档没说,现已在docs/installation*.md写明;是否让它幂等是另一个决定。② 机器上没有nvidia-smi时doctor --device cuda会抛 traceback(nvidia-smi failed while resolving a GPU device),到不了 gpumd 检查;这是所有引擎共用的_probe_environment行为,真实测试里用 nvidia-smi shim 绕开观察 gpumd 路径。DATA IMPACT
无。不改任何模型、数值、轨迹或分析结果;只改 NEP 的安装计划与文档。其他后端的安装计划不变。
https://claude.ai/code/session_01GYQHUEKJ91XQC4Hzj11Q1X
Generated by Claude Code